#ifndef SCENE_H
#define SCENE_H

#include "common.h"
#include "singleton.h"

enum ERenderType
{
    eRender_None = 0,
    eRender_AlphaTex_ColorDiff,
    eRender_Texture,
    eRender_Tex1All_Tex2Alpha,
    eRender_Text,
    eRender_Num,
};

enum ERenderLayer
{
    eLayer_Map = 0,
    eLayer_Terrain_Base,
    eLayer_Terrain,
    eLayer_Province,
    eLayer_Entity,
    eLayer_City,
    eLayer_Army,
    eLayer_Top,
};

class CRenderObject;
typedef std::vector<CRenderObject*> RenderObjVec;
typedef std::vector<RenderObjVec> RenderLayerVec;
typedef std::map<int, RenderLayerVec> RenderMap;

class CScene:public CSingleton<CScene>
{
    IMPLEMENT_SINGLETON(CScene);
public:
    void Initialize( );
    void Render( );
    void ResetRenderObjs( );

    void AddRenderObject( CRenderObject *pObj );
    void BeginRender( int rendertype );
    void EndRender( int rendertype );

protected:
    RenderLayerVec &GetLayerVec( int layer );

private:
    RenderMap m_renderObjs;
};

#endif